define(["angularAMD"], function (angularAMD) {
    angularAMD.service('C12Settings', ['$rootScope', '$filter', '$translate', 'config', 'MMWService', '$mdDialog',
        function($rootScope, $filter, $translate, config, $MMWService, $mdDialog){
            this.init = function(options, feedback){
                var openDialog = function(){
                    $mdDialog.dialog(
                        'module/moduleC/program/C12/C12Settings.tmp.html',
                        function(dialog){
                            return {
                                css_url:'module/moduleC/program/C12/C12Settings.css',
                                refresh:options,
                                ClickRefresh:function(){
                                    dialog.refresh.is_start = dialog.refresh.is_start != 'Y'?'Y':'N';
                                },
                                back: function () {
                                    dialog.hide();
                                },
                                confirm:function(){
                                    dialog.hide();
                                    if(typeof(feedback) == "function"){
                                        feedback(dialog.refresh);
                                    }
                                }
                            };
                        }
                    );
                };

                openDialog();
            }
        }
    ]);
});
